import useUserStore from "@/store/user"

export function needLogin(callback: Function = () => {}) {
	const { token } = useUserStore()
	console.log("needLogin", token)
	if (!token) {
		return uni.navigateTo({
			url: "/pages/login/index",
		})
	} else {
		//TODO 已登录
		callback()
		return false
	}
}
